# prompt> make
#
CC = /usr/vacpp/bin/xlC_r         # compiler to use
MPICC = /usr/bin/mpcc_r  # the MPI cc compiler
CFLAGS = -O3     # optimize code
DFLAGS =         # common defines

default:all

all: prefix_sum.openmp prefix_sum.mpi
#sum_mpi sum_mpi2

#
# pthreads summation demo program
#

prefix_sum.openmp:prefix_sum.openmp.c
        $(CC) $(CFLAGS) $(DFLAGS) -qsmp=omp -q64  -o $@  $@.c

#
# MPI summation demo programs
#

prefix_sum.mpi : prefix_sum.mpi.c
        $(MPICC) $(CFLAGS) $(DFLAGS) -q64 -qarch=auto -o $@ $@.c

# clean up
#
clean:
        rm prefix_sum.openmp sum_mpi sum_mpi2 > /dev/null 2>&1

